<template>
  <div>
    <div class="crumb">
      <el-breadcrumb>
        <el-breadcrumb-item><i class="el-icon-menu"></i>基础表格</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <div class="container">
      <div class="handle-box">
        <el-button type="primary">批量删除</el-button>
        <el-select v-model="value" placeholder="筛选省份" class="handle-select">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
          </el-option>
        </el-select>
        <el-button type="primary" icon="search">搜索</el-button>
      </div>
      <div>
        <!-- <marquee>第三方很多事解放军第三的第三方的方</marquee> -->
        <el-table style="width: 100%" border :data="tableData">
          <el-table-column type="selection" width="55" align="center"> </el-table-column>
          <el-table-column label="日期" sortable prop="date">
            <!-- <template slot-scope="scope">{{ scope.row.date }}</template这种方式无法进行排序 -->
          </el-table-column>
          <el-table-column label="姓名" prop="name"></el-table-column>
          <el-table-column label="地址" prop="address"></el-table-column>
          <el-table-column label="操作" align="center">
            <template slot-scope="scope">
              <el-button @click="handleClick(scope.row)" type="text" size="small" icon="el-icon-edit">编辑</el-button>
              <el-button type="text" size="small" icon="el-icon-delete" class="text-red">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      value: '',
      options: [
        {
          value: 0,
          label: '广东省'
        },
        {
          value: 1,
          label: '湖南省'
        }
      ],
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  },
  methods: {
    handleClick () {
      alert(33)
    }
  }
}
</script>

<style scoped>
.crumb {
  margin: 10px 0px;
}
.container {
  padding: 30px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
}
.handle-select {
  width: 120px;
}
</style>
